let message = "global message"
let obj = {message: 'obj message'}
function foo() {
    console.log(message);
    function bar() {
        with(obj) {
            console.log(message);
        }
    }
    bar()
}
foo()